import store from "@/store";

export const formItemStyle = {
  paddingLeft: "20px",
};

// 单元格样式
export const cellStyle = {
  background: "rgba(28, 155, 252, 0.02)",
  color: "rgb(142, 155, 185)",
  textAlign: "center",
};

// 表头单元格样式
export const headerCellStyle = {
  background: "rgba(28, 155, 252, 0.02)",
  color: "rgb(142, 155, 185)",
  textAlign: "center",
};

// 表格内表单子样式
export const tableFormStyle = {
  marginBottom: 0,
};

export const formBase = [
  {
    label: "日期",
    type: "daterange",
    field: "Time",
    otherOptions: {
      disabled: false,
      rangeSeparator: "至",
      startPlaceholder: "开始日期",
      endPlaceholder: "结束日期",
      valueFormat: 'yyyy-MM-dd hh:mm:ss',
      pickerOptions: {
        shortcuts: [
          {
            text: "昨天",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "三天",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 3);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "一周",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "一月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit("pick", [start, end]);
            },
          },
        ],
      },
    },
  },
  {
    label: "目的地区",
    type: "select",
    field: "destinationId",
    optionsKey: "destinationName",
    optionsValue: "id",
    options: store.state.custom_dict.destination,
  },
];

export const tableBase = [
  {
    label: "收货人姓名",
    prop: "userName"
  },
  {
    label: "收货人电话",
    prop: "arrivalTime"
  },
  {
    label: "国家",
    prop: "cargoName"

  },
  {
    label: "详细地址",
    prop: "courierNumber"
  },
  {
    label: "运输方式",
    prop: "companyName"
  },
  {
    label: "客户订单号",
    prop: "userId"
  }
]
